package cn.anzhiyublog.staranimegallery.model.enums;

import lombok.Getter;

/**
 * 审核枚举
 *
 * @author 安知一只鱼
 */
@Getter
public enum ReviewStatus {
    PENDING(0, "待审核"),
    PASSED(1, "通过"),
    REJECTED(2, "拒绝");

    private final Integer code;
    private final String message;

    ReviewStatus(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static ReviewStatus getReviewStatus(Integer code) {
        for (ReviewStatus reviewStatus : ReviewStatus.values()) {
            if (reviewStatus.getCode().equals(code)) {
                return reviewStatus;
            }
        }
        return null;
    }
}
